<template>
  <div>
    <subscate :data="cate" @pid="getpid"/>
  </div>
</template>

<script>
import subscate from "./subscate";

export default {
  name: "add_cate",
  data() {
    return {
      cate: [],
      pid: 0
    }
  },
  components: {
    'subscate': subscate
  },
  methods: {
    get_cate() {
      this.$axios.get('/cate/cate')
        .then(res => {
          if (res.data.code == 200) {
            this.cate = res.data.list
          }
        })
    },
    getpid(v) {
      this.pid = v
    }
  },
  mounted() {
    this.get_cate()
  }
}
</script>

<style scoped>

</style>
